﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ADC.BL;

namespace ADC.Web
{
    public partial class ConsultingDetails : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                InitData();
            }
        }

        private void InitData()
        {
            var ID = Convert.ToInt32(Request.Params["ID"].ToString());
            var consulting = ConsultingFactory.GetByID(ID);
            lblTitle.Text = consulting.Title;
            lblCaption.Text = consulting.Body;
            lblDescription.Text = consulting.BodyDetails;
            ImageDisscount.ImageUrl = consulting.ImagePath;
        }
    }
}